#ifndef NDD_CONVERSION_PANNEL_H
#define NDD_CONVERSION_PANNEL_H

#include <QWidget>
#include <QSettings>
#include "MyQsciDoc.h"
#include "ui_ConvertPannel.h"

class QsciScintilla;
class ConversionPannel : public QWidget
{
	Q_OBJECT
public:
	ConversionPannel(MyQsciDoc &mydoc, QWidget* parent = nullptr);
	~ConversionPannel();

private:
    void UpdateText(uint64_t val, int fromRadix);
    void Clear();
    void SetReadOnly(bool readOnly);

private slots:
    void AsciiCopy();
    void AsciiInsert();
    void DecimalCopy();
    void DecimalInsert();
    void HexCopy();
    void HexInsert();
    void BinaryCopy();
    void BinaryInsert();
    void OctetCopy();
    void OctetInsert();
    void AsciiChanged(QString text);
    void DecimalChanged(QString text);
    void HexChanged(QString text);
    void BinaryChanged(QString text);
    void OctetChanged(QString text);

private:
    MyQsciDoc &doc;
    QString lastAsciiStr;
    QString lastDecimalStr;
    QString lastHexStr;
    QString lastBinaryStr;
    QString lastOctetStr;

public:
    Ui::ConvertPannel ui;
};
#endif // NDD_CONVERSION_PANNEL_H